package com.yp.infrastructure.demo.config.security;

import com.yp.infrastructure.shiro.service.ISecurityService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Component;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.util.List;

@Slf4j
@Component
public class PartnerSecurityServiceImpl implements ISecurityService
{

    public void preHandle(HttpServletRequest request, HttpServletResponse response) {
    }

    public void postHandle(HttpServletRequest request, HttpServletResponse response) {
    }

    public boolean isAccessAllowed(String token) {
        log.debug("token: {}", token);
        return true;
    }

    public List<String> urls() {
        return List.of("/partner/**");
    }
}
